package thread;

public class PriorityDemo {
    public static void main(String[] args) {
        Thread min = new Thread(){
            public void run(){
                for(int i=0;i<1000;i++){
                    System.out.println("min");
                }
            }
        };

        Thread max = new Thread(){
            public void run(){
                for(int i=0;i<1000;i++){
                    System.out.println("amx");
                }
            }
        };


        Thread run = new Thread(){
            public void run(){
                for(int i=0;i<1000;i++){
                    System.out.println("run");
                }
            }
        };

        min.setPriority(10);
        run.setPriority(1);
        max.start();
        min.start();
        run.start();


    }
}
